package gemini.castor.ui.client.service;

import gemini.basic.model.Cart;
import gemini.basic.model.Order;
import gemini.basic.model.Payment;
import gemini.basic.model.Person;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface ShoppingServiceAsync {
	void saveOrUpdateOrder(Order order, AsyncCallback<Order> callback);

	void deleteOrder(Order order, AsyncCallback<Void> callback);

	void getOpenCartByDistributorId(int distributorId,
			AsyncCallback<Cart> callback);

	void saveOrUpdateOrders(ArrayList<Order> orders,
			AsyncCallback<ArrayList<Order>> callback);

	void deleteOrders(ArrayList<Order> orders, AsyncCallback<Void> callback);

	void createCart(Person person, AsyncCallback<Cart> callback);

	void completeCart(int cartId, Payment payment,
			AsyncCallback<Void> callback);

	void checkOut(Payment payment,
			AsyncCallback<Void> callback);
}
